package org.rdst.urchin;

import lombok.ToString;

/**
 * author:liuzhou
 * date: 2018-11-24
 */

public class AJAXResult {
    /**
     * 520:成功
     * 250：失败
     */
    private int code=520;//返回状态代号（默认成功）
    /**
     * 520：success
     * 250:error
     */
    private String status ="success";//状态说明
    private Object message;
    public AJAXResult(Object msg){
        this.message = msg;
    }
    public AJAXResult(Object msg,int code){
        if (code == 250){
            this.status = "error";
        }
        this.message=msg;
    }
//------------------------下面代码请忽视，不要更改------------------------------------//
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Object getMessage() {
        return message;
    }

    public void setMessage(Object message) {
        this.message = message;
    }
}
